// Copyright 2019 The Go Authors. All rights reserved.
// Use of this session code is governed by a BSD-style
// license that can be found in the LICENSE file.

package session
//
//import (
//	"tsgo/types"
//	"tsgo/types/syntaxkind"
//)
//
//type ImplementationLocation struct {
//	textSpan types.TextSpan
//	fileName string
//}
//
//func getImplementationAtPosition(typeChecker types.ITypeChecker, sourceFiles []*types.SourceFile, ast *types.Node) []ImplementationLocation {
//	// If invoked directly on a shorthand property assignment, then return
//	// the declaration of the symbol being assigned (not the symbol being assigned to).
//	if ast.Kind == syntaxkind.SuperKeyword || isSuperProperty(ast.Parent) {
//		// References to and accesses on the super keyword only have one possible implementation, so no
//		// need to "Find all References"
//		var symbol = typeChecker.GetSymbolAtLocation(ast)
//		return symbol.valueDeclaration && [FindAllReferences.getReferenceEntryFromNode(symbol.valueDeclaration)];
//	} else {
//		// Perform "Find all References" and retrieve only those that are implementations
//		var referencedSymbols = FindAllReferences.getReferencedSymbolsForNode(typeChecker, cancellationToken,
//			ast, sourceFiles, /*findInStrings*/ false, /*findInComments*/ false, /*isForRename*/ false, /*implementations*/ true);
//		var result = flatMap(referencedSymbols, symbol = >
//		map(symbol.references,(
//		{
//			textSpan, fileName
//		}) = > (
//		{
//			textSpan, fileName
//		})));
//
//		return result && result.length > 0 ? result:
//		undefined;
//	}
//}